/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package cn.knet.sp.ncrm.modules.sys.customertype.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

import cn.knet.sp.ncrm.common.persistence.Page;
import cn.knet.sp.ncrm.common.service.CrudService;
import cn.knet.sp.ncrm.modules.sys.customertype.dao.CustomerTypeDao;
import cn.knet.sp.ncrm.modules.sys.customertype.entity.CustomerType;

/**
 * 客户类型Service
 * @author zhangbin
 * @version 2015-08-27
 */
@Service
@Transactional(readOnly = true)
public class CustomerTypeService extends CrudService<CustomerTypeDao, CustomerType> {

	public CustomerType get(String id) {
		return super.get(id);
	}
	
	public List<CustomerType> findList(CustomerType customerType) {
		return super.findList(customerType);
	}
	
	public Page<CustomerType> findPage(Page<CustomerType> page, CustomerType customerType) {
		return super.findPage(page, customerType);
	}
	
	@Transactional(readOnly = false)
	public void save(CustomerType customerType) {
		super.save(customerType);
	}
	
	@Transactional(readOnly = false)
	public void delete(CustomerType customerType) {
		super.delete(customerType);
	}

	public int findDistinctCustomerType(CustomerType customerType) {
		return dao.findDistinctCustomerType(customerType);
	}
}